Skip to content

installer: float all windows by default, add --no-float - #21

Open
DexulDev wants to merge 3 commits into
0-ss:mainfrom
DexulDev:floating_window_rule
Open

DexulDev wants to merge 3 commits into
0-ss:mainfrom
DexulDev:floating_window_rule

Conversation

@DexulDev

Copy link
Copy Markdown

What

Adds a window rule to the generated macshell.lua that makes new windows
float by default (match = {}, float = true), so windows overlap and can be
dragged freely instead of being tiled.

Adds a --no-float installer option to turn it off. The choice is saved in
state.env, so automatic updates keep it.

Why

MacShell aims to feel like macOS, where windows overlap and are positioned
freely. Hyprland tiles by default, which clashes with the Dock, menu bar and
window switcher behaviour out of the box.

Behavior change

  • The rule applies to all windows, not only MacShell's own.
  • Users who prefer tiling lose it by default.
  • Existing installs get the rule on their next update, because they have no
    float= entry in state.env yet.

How to disable

Run the installer with --no-float:

./install.sh --no-float

The choice is stored as float=off in ~/.local/share/macshell/state.env, so
macshell-update and the daily timer keep it. Reload Hyprland afterwards
(hyprctl reload).

There is no flag to turn it back on after --no-float; removing the float=
line from state.env does it.

Changes

  • install.sh: new SKIP_FLOAT variable, --no-float argument, saved
    preference read from state.env, float=on|off written by write_state,
    and the rule written conditionally in write_macshell_lua. It is no longer
    inside the fixed heredoc, so it can be left out.
  • README.md: documents --no-float.

Testing

Tested the installer logic in a sandboxed HOME (HOME=/tmp/...,
--local --no-deps --no-services), checking how many times
macshell-float-all appears in the generated macshell.lua:

  • Fresh install: 1.
  • --no-float: 0, and float=off saved in state.env.
  • --update without the flag after --no-float: stays at 0.
  • --update with no float= entry in state.env (existing install): 1.

bash -n install.sh passes. ShellCheck reports only warnings that were already
in the file.

Not tested against a live Hyprland session, so match = {} being accepted by
Hyprland 0.55 is unverified.

@DexulDev DexulDev changed the title installer: float all windows by default, add --no-floatFloating window rule installer: float all windows by default, add --no-float Oct 21, 2026
MythosOfs added a commit to MythosOfs/MacShell that referenced this pull request Nov 22, 2026
Bring in Debian 13 support, GIF and WebP widgets, animated album art,
karaoke lyrics, System Monitor, optional Genie minimize, floating window
defaults, uptime, WireGuard, the audio hub, Reminders, Spotlight subtraction,
pinned-only Dock mode, tray collapse, and the unified icon grid.

Keep the fork's existing Spotlight screenshot search and Bluetooth status
reader. Sample Dock icons from the existing Image, fetch Apple Music motion
art from its public album page, and reuse MacLock's existing Spotify helper.
Isolate optional lyrics dependencies in a virtual environment.

Upstream: 0-ss#9, 0-ss#10, 0-ss#11, 0-ss#12, 0-ss#14, 0-ss#19, 0-ss#21, 0-ss#28, 0-ss#45, 0-ss#47,
0-ss#49, 0-ss#50, 0-ss#52, 0-ss#53, 0-ss#54.

Co-authored-by: 4sakenme <thienphutrinh4567@gmail.com>
Co-authored-by: Dexul <lcedu.dev@gmail.com>
Co-authored-by: Doffi4 <206447286+Doffi4@users.noreply.github.com>
Co-authored-by: Hrithik Ram Prasath <220790015+hrithikramprasath@users.noreply.github.com>
Co-authored-by: Marian Barba <134831821+MarianC-programing@users.noreply.github.com>
Co-authored-by: Victor Zwaga <victor.zwaga@gmail.com>
Co-authored-by: freroxx <yikni2829@gmail.com>
Co-authored-by: shuretokki <tri.r.utomo@gmail.com>
Co-authored-by: w4nnnn <irwanfebriansyah112@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant